package com.bytz.modules.cms.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bytz.modules.cms.order.entity.Order;
import com.bytz.modules.cms.order.model.OrderEndUserStatistic;
import com.bytz.modules.cms.order.model.ProductLineStatisticResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 莱宝CMS—订单管理-订单主表 Mapper 接口
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 根据经销商查询终端用户订单数
     */
    List<OrderEndUserStatistic> selectEndUserCount(@Param("resellerId") String resellerId, @Param("status") String status);

    /**
     * 查询经销商每条生产线的订单数和花销总额
     */
    List<ProductLineStatisticResult> selectProductLineTotal(@Param("resellerId") String resellerId, @Param("status") String status);
}
